package me.zhengjie.modules.weixin.enums;

public enum WechatConfigEnums {
    ATMR("wx0952c8beac942ad6","aa316b3cdab1c220bbaa06e9fff0c25a","52fb29c564d1498fbf02c77d438e256d"),
    ;

    private String appid;
    private String secret;
    private String token;
    private String encodingAESKey;

    public static WechatConfigEnums getEnumsByAppid(String appid){
        for (WechatConfigEnums value : WechatConfigEnums.values()) {
            if (value.getAppid().equalsIgnoreCase(appid)){
                return value;
            }
        }
        return ATMR;
    }

    public static WechatConfigEnums getDefault(){
        return ATMR;
    }
    WechatConfigEnums(String appid, String secret, String token) {
        this.appid = appid;
        this.secret = secret;
        this.token = token;
    }

    WechatConfigEnums(String appid, String secret, String token, String encodingAESKey) {
        this.appid = appid;
        this.secret = secret;
        this.token = token;
        this.encodingAESKey = encodingAESKey;
    }

    public String getAppid() {
        return appid;
    }

    public String getToken() {
        return token;
    }

    public String getSecret() {
        return secret;
    }

    public String getEncodingAESKey() {
        return encodingAESKey;
    }
}
